package com.demo.common.constant;

import cn.hutool.core.util.StrUtil;

public class JWTConstants {
    /**
     * jwt在redis中key的前缀
     */
    public static final String JWT_REDIS_KEY_PREFIX = "TOKEN: ";
    /**
     * jwt在redis中 key 的过期时间 12 小时 单位：秒
     */
    public static final Long JWT_REDIS_EXPIRE_IN = 60 * 60 * 12L;
    public static final Long JWT_REDIS_EXPIRE_THRESHOLD = 60 * 60 * 8L;
    /**
     * 用户选中 ”记住我“ 过期时间 30 天
     */
    public static final Long JWT_REDIS_REMEMBER_EXPIRE_IN = 60 * 60 * 12L * 30;
    /**
     * 用户 ‘记住我’ 令牌token预阀值
     */
    public static final Long JWT_REDIS_REMEMBER_THRESHOLD = 60 * 60 * 12L * 20;

    public static String JWT_SECRET = StrUtil.EMPTY;
    // JWT中载体数据中的 key
    public static final String JWT_PAT_LOAD_KEY= "securityUser";
    public static final String JWT_ALG = "alg";
    public static final String JWT_ALG_VALUE = "HS256";
    public static final String JWT_TYP = "typ";
    public static final String JWT_TYP_VALUE = "JWT";
    /*
        请求同中存放 token
     */
    public static final String  AUTHORIZATION = "Authorization";
    /*
        i请求头中 令牌 token 值的前缀
     */
    public static final String  BEARER = "Bearer ";

}
